package com.gooluke.auth.exception;

import com.gooluke.common.domain.ErrorStatus;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 业务异常
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class BusinessException extends BaseException {

    // 默认错误码和消息（可根据需求覆盖）
    private static final int DEFAULT_CODE = 500;
    private static final String DEFAULT_MESSAGE = "业务异常";

    public BusinessException(String message) {
        super(DEFAULT_CODE, message);
        this.message = message;
    }

    public BusinessException(int code, String message) {
        super(code, message);
    }

    public BusinessException(int code, String message, Throwable cause) {
        super(code, message, cause);
    }

    public BusinessException(ErrorStatus errorStatus) {
        super(errorStatus);
    }

}
